home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / domacnost a kancelar / joomla / Joomla_1.5.4-Stable-Full_Package.exe / xmlrpc / includes / application.php next >
PHP Script  |  2008-07-06  |  2KB  |  75 lines

  1. <?php
  2. /**
  3. * @version        $Id: application.php 10381 2008-06-01 03:35:53Z pasamio $
  4. * @package        Joomla
  5. * @subpackage    Installation
  6. * @copyright    Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
  7. * @license        GNU/GPL, see LICENSE.php
  8. * Joomla! is free software. This version may have been modified pursuant
  9. * to the GNU General Public License, and as distributed it includes or
  10. * is derivative of works licensed under the GNU General Public License or
  11. * other free or open source software licenses.
  12. * See COPYRIGHT.php for copyright notices and details.
  13. */
  14.  
  15. // no direct access
  16. defined( '_JEXEC' ) or die( 'Restricted access' );
  17.  
  18. /**
  19. * Joomla! XML-RPC Application class
  20. *
  21. * Provide many supporting API functions
  22. *
  23. * @package        Joomla
  24. * @final
  25. */
  26. class JXMLRPC extends JApplication
  27. {
  28.     /**
  29.      * The encoding (default: UTF-8)
  30.      *
  31.      * @var string
  32.      * @access protected
  33.      */
  34.     var $_encoding = null;
  35.  
  36.     /**
  37.     * Class constructor
  38.     *
  39.     * @access protected
  40.     * @param    array An optional associative array of configuration settings.
  41.     * Recognized key values include 'clientId' (this list is not meant to be comprehensive).
  42.     */
  43.     function __construct($config = array())
  44.     {
  45.         $config['clientId'] = 4;
  46.         parent::__construct($config);
  47.  
  48.         //Set the encoding
  49.         $this->_encoding = "UTF-8";
  50.  
  51.         //Set the root in the URI based on the application name
  52.         JURI::root(null, str_replace('/'.$this->getName(), '', JURI::base(true)));
  53.  
  54.     }
  55.  
  56.     /**
  57.      * Get the charset encoding
  58.      *
  59.      * @return string the charset encoding
  60.      * @since 1.5
  61.      */
  62.     function getEncoding() {
  63.         return $this->_encoding;
  64.     }
  65.  
  66.     /**
  67.      * Set the charset encoding
  68.      *
  69.      * @var $encoding The encoding of the charset
  70.      */
  71.     function setEncoding($encoding) {
  72.         $this->_encoding = $encoding;
  73.     }
  74. }
  75. ?>